<?php
include_once(dirname(__FILE__).'/SDOSocket.php');
include_once(dirname(__FILE__).'/SDOApiHelper.php');

/**
 * Filename: ActivityManagere.java Description: Copyright: Copyright (c)
 * 2010-2020 Company: www.sdo.com
 * 
 * @author: huangcheng
 * @version: 1.0 Create at: 2010-3-16 2010 Modification Historty: Date Author
 *           Version Description
 *           ------------------------------------------------------ 2010-3-16 1.0
 *           create 1.0 version
 */

/**
  * This file is generated by GenerateServiceClient.py, SVN location:
  *     svn://192.168.90.69/i.sdo.com/sdk/trunk/unified/GenerateServiceClient.py
  *
  * Please DO NOT change this file!!! it is just a wrapper of unified service api.   
  */
class SDOApiFeedTemplateService {

	/**
	 * ע��ģ�壬����ģ�����
	 * 
	 * @param appId
	 * @param feedTitle
	 * @param feedContent
	 * @return templateId
	 * @throws Exception
	 */
	static public function addTemplate($appId, $titleTemplate, $bodyTemplate)
	{
		$api_param = array();
		$api_param['appId'] = $appId;
		$api_param['titleTemplate'] = $titleTemplate;
		$api_param['bodyTemplate'] = $bodyTemplate;
		$api_name = 'FeedTemplateService.addTemplate';
		return SDOSocket::send($api_name, $api_param);
	}

	/**
	 * ���ģ��ID����ģ�����
	 * 
	 * @param templateId
	 * @return
	 * @throws Exception
	 */
	static public function getTemplateByTemplateId($templateId)
	{
		$api_param = array();
		$api_param['templateId'] = $templateId;
		$api_name = 'FeedTemplateService.getTemplateByTemplateId';
		return SDOSocket::send($api_name, $api_param);
	}

	/**
	 * ���Ӧ��appIdȡ����ģ��
	 * 
	 * @param appId
	 * @return
	 * @throws Exception
	 */
	static public function getTemplate($appId)
	{
		$api_param = array();
		$api_param['appId'] = $appId;
		$api_name = 'FeedTemplateService.getTemplate';
		return SDOSocket::send($api_name, $api_param);
	}

	/**
     * ���templateIdɾ��ģ��
     * @param templateId
     * @throws Exception
     */
	static public function deleteTemplateByTemplateId($templateId)
	{
		$api_param = array();
		$api_param['templateId'] = $templateId;
		$api_name = 'FeedTemplateService.deleteTemplateByTemplateId';
		return SDOSocket::send($api_name, $api_param);
	}
}